const state = {
  mineInfo: uni.getStorageSync('mineInfo'),
  minName:{},
  mineHeight:{},
  mineWeigt:{},
  mineWaistline:{},
  mineMbweight:{}
}

const mutations = {
  SET_MINEINFO: (state, data) => {
    console.log('mutations',data);
    console.log('state.mineInfo',state.mineInfo);
    state.mineInfo[data.prop] = data.value;
    uni.setStorage({//将用户信息保存在本地  
      key: 'mineInfo',
      data: state.mineInfo
    })
  },
}
const actions = {
    // 修改基本信息
    setMineInfo({ commit }, data) {
       
        commit('SET_MINEINFO', data)
    },
}

export default {
  state,
  mutations,
  actions
}
